package com.dwxt.cdms.view.wristwatch;

import com.dwxt.cdms.util.DictUtil;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.time.LocalDateTime;

/**
 * 腕表-健康数据-睡眠
 *
 * @author Kuang.JiaZhuo
 * @date 2020-09-10 18:04
 */
public class SleepDataView extends CustomerBasic{

    /**
     * 睡眠数据id
     */
    private String id;

    /**
     * 睡眠类型(关联数据字典【sleepType】)
     */
    private String sleepType;

    //睡眠类型Display
    public String getSleepTypeDisplay(){
        return sleepType==null?null:DictUtil.getDisplay("sleepType",sleepType);
    }

    /**
     * 睡眠时长(分钟)
     */
    private Double sleepingTimeRange;

    /**
     * 睡眠数据所属天
     */
    private String time;

    /**
     * 入睡睡眠时间
     */
    private String beginTime;

    /**
     * 起床时间
     */
    private String endTime;

    /**
     * 创建时间(录入数据库的时间)
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    public String getId() {
        return id;
    }

    public void setSleepDataId(String sleepDataId) {
        this.id = sleepDataId;
    }

    public String getSleepType() {
        return sleepType;
    }

    public void setSleepType(String sleepType) {
        this.sleepType = sleepType;
    }

    public Double getSleepingTimeRange() {
        return sleepingTimeRange;
    }

    public void setSleepingTimeRange(Double sleepingTimeRange) {
        this.sleepingTimeRange = sleepingTimeRange;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getBeginTime() {
        return beginTime;
    }

    public void setBeginTime(String beginTime) {
        this.beginTime = beginTime;
    }

    public String getEndTime() {
        return endTime;
    }

    public void setEndTime(String endTime) {
        this.endTime = endTime;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }
}
